#include<stdio.h>
void main()
{
int a=1,b=1,s=0;
	while (a<8)
	{	
		b=b*10;
		a++;
		b=b+a;
		s=b+s;
	}
printf("%d\n",s+1);
}